package com.company.clientscard.shared.requestfactory;

import java.util.Date;
import java.util.List;

import com.company.clientscard.server.service.DaoLocator;
import com.company.clientscard.server.service.DocumentController;
import com.company.clientscard.shared.proxy.DocumentProxy;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;

public interface DocumentRequestFactory extends RequestFactory {

	@Service(value = DocumentController.class, locator = DaoLocator.class)
	public interface DocumentRequestContext extends RequestContext {
		Request<DocumentProxy> findById(Long id);

		Request<DocumentProxy> update(DocumentProxy object);

		Request<Void> save(DocumentProxy object);

		Request<List<DocumentProxy>> findWithExpression(int firstRow,
				int numberOfRows, Date date1, Date date2);
	}

	DocumentRequestContext context();
}
